package com.zbkj.dal.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum OrderAddressType {

    /**
     * 地址类型
     * 1. 寄方地址
     * 2. 收方地址
     */
    SHIPPER(1, "寄方地址"), RECEIVER(2, "收方地址"),
    ;

    @Getter
    private final Integer type;

    @Getter
    private final String name;

    public static boolean isReceive(Integer type) {
        return type != null && type.equals(RECEIVER.type);
    }

    public static boolean isSend(Integer type) {
        return type != null && type.equals(SHIPPER.type);
    }


}
